#include "../User/Component/AHRS.h"
#include "../User/Component/CMD.h"
#include "../User/Component/PID.h"

typedef struct {
  CMD_Send_t cmd_send;
  CMD_Param_t cmd_param;

  AHRS_Angle_t angle;
  AHRS_Gyro_t gyro;
  AHRS_Accel_t accel;

  int16_t AccData[3];
  int16_t GyroData[3];

  struct {
    PID_Param_t angle;
    PID_Param_t speed;
  } pid;

} Task_Runtime_t;

static Task_Runtime_t Task_Runtime = {
    .pid.speed = {.p = 0.0f,
                  .i = 0.0f,
                  .d = 0.0f,
                  .advantage =
                      {
                          .k = 0.0f,
                          .i_limit = 0.0f,
                          .d_out_limit = 0.0f,
                          .integral = 0.0f,
                          .out_limit = 0.0f,
                      }},
    .pid.angle = {.p = 0.0f,
                  .i = 0.0f,
                  .d = 0.0f,
                  .advantage =
                      {
                          .k = 0.0f,
                          .i_limit = 0.0f,
                          .d_out_limit = 0.0f,
                          .integral = 0.0f,
                          .out_limit = 0.0f,
                      }},
};
